<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>药品销量报表 </title>
    <link rel="stylesheet" href="../../lib/layui/css/layui.css" media="all">
</head>
<body>

<div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
           
            <a>
             <cite>药品销售成本利润</cite></a>
          </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
       onclick="location.reload()" title="刷新">
        <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
</div>


<div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
        <div class="layui-card-body ">
            <form class="layui-form layui-col-space5">
                <div class="layui-inline layui-show-xs-block">
                    <input class="layui-input" autocomplete="off" placeholder="开始日" name="start" id="start">
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <input class="layui-input" autocomplete="off" placeholder="截止日" name="end" id="end">
                </div>


                <div class="layui-input-inline layui-show-xs-block">
                    <select name="contrller">
                        <option value="">--- 全部类型 ---</option>
                        <option value="0"></option>
                        <option value="1">饮片</option>
                        <option value="2">颗粒</option>
                        <option value="3">袋装颗粒</option>
                    </select>

                </div>
                <div class="layui-inline layui-show-xs-block">
                    <input type="text" name="username" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <input type="text" name="username" placeholder="挂号单号" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>
                    </button>
                </div>

                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">导出</i></button>
                </div>
            </form>
        </div>

        <div class="layui-card-body layui-table-body layui-table-main">
            <table class="layui-table layui-form">
                <thead>
                <tr>

                    <th>名称</th>
                    <th>药品类型</th>
                    <th>处方类型</th>
                    <th>销售单位</th>
                    <th>取药量</th>
                    <th>实际收入</th>
                    <th>进货成本</th>
                    <th>利润</th>
                    <th>操作</th>


                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>数据</td>
                    <td>数据</td>
                    <td>数据</td>
                    <td>数据</td>
                    <td>数据</td>
                    <td>数据</td>
                    <td>数据</td>
                    <td>数据</td>
                    <td>
                        <div align="left" style="float:left">
                            <button align="left" style="height:35px;width:100px;float:left" class="layui-btn"
                                    onclick="xadmin.open('编辑','销售明细.html',600,400)" href="javascript:;">
                                <i class="layui-icon"></i>销售明细
                            </button>
                        </div>
                    </td>

                </tr>

                </tbody>
            </table>
        </div>
        <div id="demo0"></div>
    </div>
    <div class="layui-tab-item">


        <div id="demo2"></div>
    </div>
    <div class="layui-tab-item">
        <div class="layui-card-body ">
            <form class="layui-form layui-col-space5">
                <div class="layui-inline layui-show-xs-block">
                    <input class="layui-input" autocomplete="off" placeholder="开始日" name="start3" id="start3">
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <input class="layui-input" autocomplete="off" placeholder="截止日" name="end3" id="end3">
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <input type="text" name="username" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                </div>

                <div class="layui-inline layui-show-xs-block">
                    <input type="text" name="username" placeholder="挂号单号" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-inline layui-show-xs-block">
                    <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>
                    </button>
                </div>


            </form>
        </div>
    </div>
</div>

</body>
</html>
<script src="../../lib/layui/layui.js"></script>

<!-- 选项卡-->
<script>
    layui.use('element', function () {
        var $ = layui.jquery
            , element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块

        //触发事件
        var active = {
            tabAdd: function () {
                //新增一个Tab项
                element.tabAdd('demo', {
                    title: '新选项' + (Math.random() * 1000 | 0) //用于演示
                    , content: '内容' + (Math.random() * 1000 | 0)
                    , id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
                })
            }
            , tabDelete: function (othis) {
                //删除指定Tab项
                element.tabDelete('demo', '44'); //删除：“商品管理”


                othis.addClass('layui-btn-disabled');
            }
            , tabChange: function () {
                //切换到指定Tab项
                element.tabChange('demo', '22'); //切换到：用户管理
            }
        };

        $('.site-demo-active').on('click', function () {
            var othis = $(this), type = othis.data('type');
            active[type] ? active[type].call(this, othis) : '';
        });

        //Hash地址的定位
        var layid = location.hash.replace(/^#test=/, '');
        element.tabChange('test', layid);

        element.on('tab(test)', function (elem) {
            location.hash = 'test=' + $(this).attr('lay-id');
        });

    });
</script>

<!-- 日期.删除.付款-->
<script>
    layui.use(['laydate', 'form'], function () {
        var laydate = layui.laydate;
        var form = layui.form;


        // 监听全选
        form.on('checkbox(checkall)', function (data) {

            if (data.elem.checked) {
                $('tbody input').prop('checked', true);
            } else {
                $('tbody input').prop('checked', false);
            }
            form.render('checkbox');
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });


    });

    /*用户-停用*/
    function member_stop(obj, id) {
        layer.confirm('确认要停用吗？', function (index) {

            if ($(obj).attr('title') == '启用') {

                //发异步把用户状态进行更改
                $(obj).attr('title', '停用')
                $(obj).find('i').html('&#xe62f;');

                $(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
                layer.msg('已停用!', {icon: 5, time: 1000});

            } else {
                $(obj).attr('title', '启用')
                $(obj).find('i').html('&#xe601;');

                $(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
                layer.msg('已启用!', {icon: 5, time: 1000});
            }

        });
    }

    /*用户-删除*/
    function member_del(obj, id) {
        layer.confirm('确认已缴费了吗？', function (index) {
            //发异步删除数据
            $(obj).parents("tr").remove();
            layer.msg('已缴费!', {icon: 1, time: 1000});
        });
    }


</script>
</html>


<!--分页-->
<script>
    layui.use(['laypage', 'layer'], function () {
        var laypage = layui.laypage
            , layer = layui.layer;

        //总页数低于页码总数
        laypage.render({
            elem: 'demo0'
            , count: 100 //数据总数
        });
        //调用分页
        laypage.render({
            elem: 'demo20'
            , count: data.length
            , jump: function (obj) {
                //模拟渲染
                document.getElementById('biuuu_city_list').innerHTML = function () {
                    var arr = []
                        , thisData = data.concat().splice(obj.curr * obj.limit - obj.limit, obj.limit);
                    layui.each(thisData, function (index, item) {
                        arr.push('<li>' + item + '</li>');
                    });
                    return arr.join('');
                }();
            }
        });

    });
</script>

<!--日期2-->
<script>
    layui.use(['laydate', 'form'], function () {
        var laydate = layui.laydate;
        var form = layui.form;


        // 监听全选
        form.on('checkbox(checkall)', function (data) {

            if (data.elem.checked) {
                $('tbody input').prop('checked', true);
            } else {
                $('tbody input').prop('checked', false);
            }
            form.render('checkbox');
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#start2' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end2' //指定元素
        });


    });
</script>
<!--分页2-->
<script>
    layui.use(['laypage', 'layer'], function () {
        var laypage = layui.laypage
            , layer = layui.layer;

        //总页数低于页码总数
        laypage.render({
            elem: 'demo2'
            , count: 100 //数据总数
        });
        //调用分页
        laypage.render({
            elem: 'demo20'
            , count: data.length
            , jump: function (obj) {
                //模拟渲染
                document.getElementById('biuuu_city_list').innerHTML = function () {
                    var arr = []
                        , thisData = data.concat().splice(obj.curr * obj.limit - obj.limit, obj.limit);
                    layui.each(thisData, function (index, item) {
                        arr.push('<li>' + item + '</li>');
                    });
                    return arr.join('');
                }();
            }
        });

    });
</script>


</script>
